﻿

@model IEnumerable<EFEntity.Esalary_standard>
<script src="~/javascript/jquery-1.7.2.js"></script>
<script src="~/Scripts/vue.js"></script>
<script src="~/Scripts/bootstrap.js"></script>
<link href="~/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
<!DOCTYPE html>
@***********************复核显示页面******************@
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>salarystandard_change_list</title>
</head>
<body>
    <div id="app">
        <p>
            <span>您正在做的业务是:人力资源管理--薪酬标准管理--薪酬标准登记复核</span>
        </p>
        <table class="table table-bordered table-striped">
            <thead class="info">
                <tr >
                    <th>
                        @Html.DisplayNameFor(model => model.standard_id)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.standard_name)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.designer)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.regist_time)
                    </th>

                    <th>
                        @Html.DisplayNameFor(model => model.salary_sum)
                    </th>
                    <th>复核</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.standard_id)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.standard_name)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.designer)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.regist_time)
                        </td>

                        <td>
                            @Html.DisplayFor(modelItem => item.salary_sum)
                        </td>

                        <td>
                            @Html.ActionLink("复核", "salarystandard_change", new { id = item.ssd_id, sid = item.standard_id })

                        </td>
                    </tr>
                }
            </tbody>
        </table>
        <div align="center" style="font-size: 18px;color: gray">
            &nbsp;&nbsp;总数：
            <font style="color: maroon;font-weight: bold;">@ViewBag.rows</font>
            例
            &nbsp;&nbsp;&nbsp;
            每页显示 <font style="color: maroon;font-weight: bold;">@ViewBag.pageSize</font>
            条
            &nbsp;&nbsp;&nbsp;
            当前第 <font style="color: maroon;font-weight: bold;">@ViewBag.cp</font>
            页
            &nbsp;&nbsp;&nbsp;共
            <font style="color: maroon;font-weight: bold;">@ViewBag.pages</font>
            页
            <a style="color: navy;font-weight: bold" href="/salaryCriterion/salarystandard_change_list?currentpage=1">首页</a>
            @{ ViewData["cp"] = (int)ViewData["cp"] - 1 > 0 ? (int)ViewData["cp"] - 1 : 1;}
            <a style="color: navy;font-weight: bold"
               href="/salaryCriterion/salarystandard_change_list?currentpage=@ViewData["cp"]">上一页</a>
            @{ ViewData["c"] = (int)ViewData["c"] + 1 < ViewBag.pages ? (int)ViewData["c"] + 1 : ViewBag.pages;}
            <a style="color: navy;font-weight: bold"
               href="/salaryCriterion/salarystandard_change_list?currentpage=@ViewData["c"]">下一页</a>
            <a style="color: navy;font-weight: bold"
               href="/salaryCriterion/salarystandard_change_list?currentpage=@ViewBag.pages">末页</a>


        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            list: [],
            rows: 0,
            pages: 0,
            currentpage: 1,
            pageSize: 3,
            tpage: 1
        },
        methods: {
            load: function () {
                var t = this;
                $.ajax({
                    url: "/salaryCriterion/salarystandard_change_list",
                    type: "post",
                    data: "currentpage=" + t.currentpage,
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.list = dts["list"];
                        t.rows = dts["rows"];
                        t.pages = dts["pages"];
                    }
                });
            },
            first: function () {
                this.currentpage = 1;
                this.load();
            },
            prev: function () {
                if (this.currentpage > 1) {
                    this.currentpage--;
                } else {
                    this.currentpage = 1;
                }
                this.load();
            },
            next: function () {

                if (this.currentpage < this.pages) {
                    this.currentpage++;
                } else {
                    this.currentpage = this.pages;
                }
                this.load();
            },
            last: function () {
                this.currentpage = this.pages;
                this.load();
            },
            tiao: function () {
                var hua = $("#huahua").val();
                var hua = this.tpage;
                if (hua > 0 && hua <= this.pages) {
                    this.currentpage = this.tpage;
                }
                else if (hua == "" || hua == null) {
                    this.currentpage = 1;
                }
                else {
                    alert("没有该页数");
                    this.currentpage = 1;
                    this.tpage = "";
                }
                this.load();
            }
        },
        mounted: function () {
            this.load();
        }
    });
</script>
